//
//  CALayer+PauseAnimate.h
//  MJII
//
//  Created by 喂猪小能手 on 2018/8/30.
//  Copyright © 2018年 喂猪小能手. All rights reserved.
//


#import "MainModuleAPI.h"
#import "MJTabBar.h"
#import "MJTabBarController.h"
#import "MJNavBar.h"
#import "MJMiddleView.h"

@implementation MainModuleAPI

+ (MJTabBarController *)rootTabBarCcontroller {
    return [MJTabBarController shareInstance];
}


+ (void)addChildVC:(UIViewController *)vc normalImageName:(NSString *)normalImageName selectedImageName:(NSString *)selectedImageName isRequiredNavController:(BOOL)isRequired {

    [[MJTabBarController shareInstance] addChildVC:vc normalImageName:normalImageName selectedImageName:selectedImageName isRequiredNavController:isRequired];

}


+ (void)addChildVC:(NSArray *)param {
    
    UIViewController *vc = param[0];
    NSString *nImg = param[1];
    NSString *sImg = param[2];
    BOOL isRe = [param[3] boolValue];
    
    [self addChildVC:vc normalImageName:nImg selectedImageName:sImg isRequiredNavController:isRe];
    
}


+ (void)setTabbarMiddleBtnClick: (void(^)(BOOL isPlaying))middleClickBlock {

    MJTabBar *tabbar = (MJTabBar *)[MJTabBarController shareInstance].tabBar;
                                  
    tabbar.middleClickBlock = middleClickBlock;

}

/**
 *  设置全局的导航栏背景图片
 *
 *  @param globalImg 全局导航栏背景图片
 */
+ (void)setNavBarGlobalBackGroundImage: (UIImage *)globalImg {
    [MJNavBar setGlobalBackGroundImage:globalImg];
}
/**
 *  设置全局导航栏标题颜色, 和文字大小
 *
 *  @param globalTextColor 全局导航栏标题颜色
 *  @param fontSize        全局导航栏文字大小
 */
+ (void)setNavBarGlobalTextColor: (UIColor *)globalTextColor andFontSize: (CGFloat)fontSize {

    [MJNavBar setGlobalTextColor:globalTextColor andFontSize:fontSize];

}

+ (UIView *)middleView {
    return [MJMiddleView middleView];
}


@end
